﻿
namespace Xc.DataAccess.Protocoals.WaterMeters.Models
{
    public abstract class MeterFrameRxBase : MeterFrameRx
    {
        public MeterFrameRxBase() { }
        public MeterFrameRxBase(MeterFrameRx dataArea) 
        {
            if (dataArea==null)
            {
                return;
            }
            this.MeterAddress = dataArea.MeterAddress;
            this.Cmd = dataArea.Cmd;
            this.MeterType = dataArea.MeterType;
            IsValidate= this.SetDataArea(dataArea.DataArea);
        }
        public bool IsValidate { get; set; }
        /// <summary>
        /// 设置数据域的解析
        /// </summary>
        /// <param name="dataArea"></param>
        protected abstract bool SetDataArea(DataArea dataArea);
    }
}
